<template>
	<view class="container">
		<!-- 系统消息 -->
		<view class="list">
			<view class="list-item" v-for="(item,index) in listData" :key="index">
				<view class="time">{{item.created_time_str}}</view>
				<view class="msg">
					{{item.content}}
				</view>
			</view>
			<cu-empty tips="暂时没有数据~" v-if="listData && listData.length == 0"></cu-empty>
			<u-loadmore v-else :status="refreshStatus" />
		</view>
	</view>
</template>

<script>
	
	import Refresh from '@/mixins/refresh'
	export default {
		mixins: [Refresh],
		data() {
			return {
				listData: null,
			}
		},
		onLoad() {
			this.getList(false);
		},
		methods: {
			getList(status) {
				this.$Net.get(this.$api.user_msg_list, {
					...this.searchReq,
					type: 6 //1提醒，2评论，3点赞，4收藏，5关注，6系统消息
				}, 1).then(res => {
					this.setStatus(res.count, res.list, status);
				}).catch(() => {
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.container {
		background: #F5F7F8;
		padding-top: 24rpx;

		.list {

			.list-item {
				width: 686rpx;
				margin-bottom: 40rpx;

				.msg {
					color: rgba(0, 0, 0, 0.80);
					font-family: "PingFang SC";
					font-size: 28rpx;
					font-weight: 400;
					padding: 32rpx 36rpx;
					border-radius: 16rpx;
					background: #FFF;
					margin-top: 24rpx;
				}

				.time {
					color: rgba(0, 0, 0, 0.40);
					text-align: center;
					font-family: "PingFang SC";
					font-size: 24rpx;
					font-weight: 400;
				}
			}
		}

	}
</style>